﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Stock.Models.Classes
{
    class Product
    {
        public virtual string Name { get; set; }
        public virtual Guid Id { get; set; }
        public virtual decimal CostPrice { get; set; }
        public virtual decimal Quantity { get; set; }
        public virtual decimal ListPrice { get; set; }
        //public virtual Byte[] Image { get; set; }

        public override bool Equals(object obj)
        {
            if (this == obj) return true;
            Product product2 = obj as Product;
            if (product2 == null) return false;
            return this.Id == product2.Id;
        }

        public override int GetHashCode()
        {
            return ((this.Id == null) ? 0 : this.Id.GetHashCode()) ^ ((this.Name == null) ? 0 : this.Name.GetHashCode());
        }

    }
}
